Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: "the expression of type vector needs unchecked conversion" when using getItemValue in Java
Feedback Type: Question
Product Area: Domino Designer on Eclipse (DDE)
Technical Area: Error Message
Platform: Windows
Release: 8.5.2
Reproducible: Always

Hi,

I have this line in a Java agent:
Vector v = docUser.getItemValue("Type");

This line generates the following warning:
"Vector is a raw type. References to generic type Vector<E> should be parameterized"

I then modified my line for this:
Vector<String> v = docUser.getItemValue("Type");

That line now generates this warning:
"Type safety: The expression of type Vector needs unchecked conversion to conform to Vector<String>"

I know this warning is caused because the compiler has no way of knowing what type will be returned by "getItemValue".

All I want to do is add a value to a multi-value field, after checking if that value isn't already in the list.

I was using this:
if (v.indexOf(value) == -1) { ... }

I would like to find the proper way to avoid that warning.

Can someone helps?

Thanks!


Feedback number WEBB8E5R5M created by ~Denise Prehipi on 02/16/2011

Status: Open
Comments:

"the expression of type vector need... (~Denise Prehipi... 16.Feb.11)
. . Try a different getItemValue method... (~Tate Quetgerob... 16.Feb.11)
. . . . I did... (~Denise Prehipi... 16.Feb.11)
. . Unchecked exception (~Kelly Ekfookon... 16.Feb.11)
. . . . question (~Denise Prehipi... 16.Feb.11)
. . . . Don't supress the warnings. Use Vec... (~Sanjay Quettum... 17.Feb.11)
. . . . . . Warning's gone! (~Denise Prehipi... 17.Feb.11)
. . . . . . . . Late reply (~Sean Minjumivi... 30.Jun.14)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS